|
|
 |
|
|
|
|
199: .Provider = MSDASQL
200: .ConnectionString = argConnStr 'DSN=Pubs;UID=sa;PWD=;
201: .ConnectionTimeout = 30
202: .Open
203: ' Find out if the attempt to connect worked.
204: If .State = adStateOpen Then
205: ' MsgBox Connection successfully established
206: ' Else
207: ' MsgBox Connection not successfully established
208: End If
209: End With
210: Exit Sub
211: openConnectionErr:
212: MsgBox CStr(Err.Number) & : & Err.Description
213: Set mvarpDBConnection = Nothing
214:
215: End Sub
216:
217: '##ModelId=352AB4D001C2
218: Private Sub Class_Initialize()
219: ' mvarDefaultDriverName = {SQL Server}
220: ' mvarDefaultServerName = rc01_srvr
221: mvarDefaultDriverName = {MS Access}
222: mvarDefaultServerName =
223: End Sub
224: |
|
|
|
|
|
|
|
|
LISTING 19.2. THE CODE FOR THEDBAdoResultsetCLASS. |
|
|
|
 |
|
|
|
|
1: VERSION 1.0 CLASS
2: BEGIN
3: MultiUse = -1 'True
4: END
5: Attribute VB_Name = DBAdoResultset
6: Attribute VB_GlobalNameSpace = True
7: Attribute VB_Creatable = True
8: Attribute VB_PredeclaredId = False
9: Attribute VB_Exposed = False
10: Attribute VB_Ext_KEY = SavedWithClassBuilder ,Yes
11: Attribute VB_Ext_KEY = Member0 ,DBColumn
12: Attribute VB_Ext_KEY = Top_Level ,Yes
13: Attribute VB_Ext_KEY = RVB_UniqueId ,352AB4DC0096
14: 'local variable(s) to hold property value(s)
15: '##ModelId=352AB4DC0212
16: Private mvarpSQLTimeout As Integer 'local copy
17: '##ModelId=352AB4DC0280
18: Private mvarpCurrentSQL As String 'local copy
19: '##ModelId=352AB4DC02BC
20: Private mvarpPreviousSQL As String 'local copy
|
|
|
|
|
|